/**
* COPYRIGHT. whx. ALL RIGHTS RESERVED.
* Project: just-core
* Author: whx <harrywu304@gmail.com>
* Create On: Apr 12, 2012 7:46:14 PM
*/

package org.justframework.core.mapper;

/**
 *Mapper between Bean and serialized bytes
 */
public interface Mapper {
	
	/**
	 * map bytes to Bean
	 * @param json
	 * @param clazz
	 * @return
	 */
	public <T> T toBean(String result, Class<T> clazz);
	
	/**
	 * serialize bean to bytes
	 * @param bean
	 * @return serialized bytes
	 */
	public String toSerial(Object bean);

}
